﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ZFMaster.Master" AutoEventWireup="true"
    CodeBehind="qzlist.aspx.cs" Inherits="ZF.WS.info.qzlist" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 
 
       <div class="location mb10_">
        您现在的位置：<a href="/"><%=SiteInfo.Instance.SystemConfig.SiteName %></a>>> <a href="<%=this.Request.Url %>">求购求租房列表</a>
    </div>
    
    <table>
        <tr>
            <td style="width: 200px" valign="top">
       
             
            
                <div class="board infosearch lrsearch" style="width:200px" >
                    <dl>
                        <dt><span>求租求购房源搜索</span> </dt>
                        <dd>
                            <% var sp = new ZF.WS.house.Search(); %>
                            <table class="w100_  ">
                            
                             <tr>
                                    <td class='t'>
                                        区域:
                                    </td>
                                    <td class='c'>
                                        <select class="ddl at">
                                            <option value="0">不 限</option>
                                            <%foreach (var t in sp.City)
                                              { %>
                                            <option value="<%=t.AreaId %>">
                                                <%=t.Name %></option>
                                            <%} %>
                                        </select>
                                        
 
                                        <script>
                                            $("select.at").change(function() {
                                                $(".tdca select").hide();
                                                $(".tdca").find(String.format("select[@paid={0}]", this.value)).show();
                                            });
                                        </script>
                                    </td>
                                </tr>
                                <tr>
                                    <td class='t'>
                                        商圈:
                                    </td>
                                    <td class='c tdca'>
                                        <select class="ddl" paid="0">
                                            <option value="0">不 限&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
                                        </select>
                                        <%foreach (var area in sp.AreaChilds)
                                          { %>
                                        <select class="ddl dn_" paid="<%=area.Id %>">
                                            <option value="0">不 限</option>
                                            <%foreach (var a in area.Childs)
                                              { %>
                                            <option value="<%=a.Id %>">
                                                <%=a.Name%></option>
                                            <%} %>
                                        </select>
                                        <%} %>
                                         
                                    </td>
                                </tr>
                                <tr class="dt">
                                    <td class='t'>
                                        房源类型:
                                    </td>
                                    <td class='c'>
                                        <select class="ddl it">
                                            <option value="0">不限</option>
                                             <option value="1">求租房源</option>
                                             <option value="2">求购房源</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td class='t'>
                                        价格范围:
                                    </td>
                                    <td class='c'>
                                        <input type="text" class="sstxt pmin" />-<input type="text" class="sstxt pmax" />
                                    </td>
                                </tr>
                                <tr>
                                    <td class='t'>
                                        发布时间:
                                    </td>
                                    <td class='c'>
                                        <select class="ddl days">
                                            <option value="0">不限</option>
                                            <option value="3">三天以内</option>
                                            <option value="7">七天以内</option>
                                            <option value="15">半个月以内</option>
                                            <option value="3">一个月以内</option>
                                        </select>
                                    </td>
                                </tr>
                                <tr>
                                    <td class='t'>
                                        关键字:
                                    </td>
                                    <td class='c'>
                                        <input type="text" class="stxt key" />
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" style="text-align: center">
                                        <input type="button" value=" 搜 索 " class="btSearch" /> 
                                    </td>
                                </tr>
                            </table>
                        </dd>
                    </dl>
                </div>
                <script>
                    $(function() {
                        var infosearch = $(".infosearch");
                        infosearch.find(".btSearch").click(function() {
                        var param = "1=1";
                        if (infosearch.find(".at")[0].value != "0")
                            param += "&aid1=" + infosearch.find(".at")[0].value;
                        if (infosearch.find(String.format(".tdca select[@paid={0}]", infosearch.find(".at")[0].value))[0].value != "0") {
                            param += "&aid2=" + infosearch.find(String.format(".tdca select[@paid={0}]", infosearch.find(".at")[0].value))[0].value;
                        }
                            
                            if (infosearch.find(".it")[0].value != "0")
                                param += "&dt=" + infosearch.find(".it")[0].value;
                            if ($.trim(infosearch.find(".pmin").val()) != "")
                                param += "&pmin=" + $.trim(infosearch.find(".pmin").val());
                            if ($.trim(infosearch.find(".pmax").val()) != "")
                                param += "&pmax=" + $.trim(infosearch.find(".pmax").val());
                            if (infosearch.find(".days")[0].value != "0")
                                param += "&days=" + infosearch.find(".days")[0].value;
                            if ($.trim(infosearch.find(".key").val()) != "")
                                param += "&key=" + infosearch.find(".key").val();

                            window.location = encodeURI("/house/qzlist.aspx?" + param);
                       

                        });
                    });
        </script>
 
                 
             　
            </td>
            <td style="width: 10px" valign="top">
            </td>
            <td style="width: 760px" valign="top">
               <div class="board info  w100_ " style="width: 100%">
        <dl>
            <dt><p>求租求购房源信息</p>
            <a href="HouseReq.aspx?dt=1" class="more" style="width:100px">发布求租信息>></a>
            <a href="HouseReq.aspx?dt=2" class="more" style="width:100px">发布求购信息>></a>
            </dt>
            <dd>
                <zf:ListView ID="lvList" runat="server">
                    <LayoutTemplate>
                        <zf:PlaceHolder ID="itemPlaceHolder" runat="server">
                        </zf:PlaceHolder>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <table class="w100_   ">
                            <tr>
                                <td class="t1">
                                    <p class="p1">
                                        <span style="color: #A651A6">(<%#Eval("City") %>)</span> <a href="/house/HouseReqInfo.aspx?hid=<%#Eval("Qiuzu.QiuzuId") %>">
                                            <%#Eval("Model")%></a>&nbsp;</p>
                                    <br />
                                    <p class="p2">
                                        <%# string.Concat(Eval("Qiuzu.Description")).MaxLength(50)%></p>
                                </td>
                                <td class="t2">
                                    <a href="/house/HouseReqInfo.aspx?hid=<%#Eval("Qiuzu.QiuzuId") %>">
                                        <%#Eval("Type") %></a>
                                </td>
                                <td class="t2">
                                    <a href="/house/HouseReqInfo.aspx?hid=<%#Eval("Qiuzu.QiuzuId")%>">
                                        <%#Eval("Qiuzu.Price")%>元</a>
                                </td>
                                <td class="t3">
                                    <%# ((DateTime)Eval("Qiuzu.AddTime")).ToShortDateString()%>
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </zf:ListView>
            </dd>
            <dd class="page">
                <table>
                    <tr>
                        <td>
                            <a href="<%=_param %>&pi=0">首 页</a> <a href="<%=_param %>&pi=<%=this.Pi > 0 ? Pi - 1 : 0 %>">
                                上一页</a> <a href="<%=_param %>&pi=<%=this.Pi+1 %>">下一页</a> <a href="<%=_param %>&pi=999999">
                                    未 页</a> &nbsp;
                        </td>
                    </tr>
                </table>
            </dd>
        </dl>
    </div>
            </td>
        </tr>
    </table>
</asp:Content>
